/************************************************************************
 * @file PanelItem.h
 * @author Ian Chen
 * @version 1.0
 *
 * @section LICENSE
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 3 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
 * General Public License for more details at
 * http://www.gnu.org/licenses/lgpl.html
 *
 ************************************************************************/
#ifndef PANELITEM_H
#define PANELITEM_H

#include <QMenu>
#include <QWidget>

#include <pluginui/pluginui_global.h>

namespace antu
{
namespace plugin
{
namespace ui
{
class PLUGINUISHARED_EXPORT PanelItem
{
private:
    QWidget* m_pWidget;
    QMenu* m_pContextMenu;

public:
    PanelItem(const QString& name, QWidget *pWidget);
    PanelItem(const QString& name, QWidget *pWidget, QMenu* pContextMenu);

    QWidget* widget()
    {
        return this->m_pWidget;
    }

    QMenu* menu()
    {
        return this->m_pContextMenu;
    }

    QString panelName() const
    {
        return this->m_pWidget->objectName();
    }

};
}
}
}

#endif // PANELITEM_H
